datagridview 獲取選中行的索引 C# CODE for (int i = 0; i < this.dataGridView1.SelectedRows.Count; i++)//遍歷所有選中的行 { this. ...